package cn.yunhe.service;

import org.apache.ibatis.session.SqlSession;

import cn.yunhe.dao.UserDao;
import cn.yunhe.entity.User;
import cn.yunhe.util.SqlSessionFactoryUtil;

public class UserService {
	//登录验证
	public User login(String username,String password) {
		SqlSession sqlSession=null;
		sqlSession=SqlSessionFactoryUtil.getsqlsession();
		UserDao userDao=sqlSession.getMapper(UserDao.class);
		User user=userDao.login(username, password);
		return user;
	}
}
